const {ccclass, property} = cc._decorator;
import PrefabManager from '../xf/manager/PrefabManager';
import Plat from '../xf/Palt';
import ViewBase from '../xf/ViewBase';
import AndroidTool from './AndroidTool';
import MdGame from './MdGame';

//电子邮件puhalskijsemen@gmail.com
//源码网站 开vpn打开 http://web3incubators.com/
//电报https://t.me/gamecode999
@ccclass
export default class MdFail extends ViewBase {

    private static _inst:MdFail;

    public static get inst()
    {
        if(this._inst==null)
        {
            let v=cc.instantiate(PrefabManager.getPrefab("FailView"));

            this._inst=v.getComponent(MdFail);
        }

        return this._inst;
    }

    public showView(data?: any): void {
        super.showView(data)
        if(AndroidTool.Instance.isAndroid()){
            AndroidTool.Instance.onLoseViewShow()
        }
    }

    public hideView(): void {
        if(AndroidTool.Instance.isAndroid()){
            AndroidTool.Instance.onLoseViewHide()
        }
        super.hideView()
    }

    public startGame()
    {
        this.hideView();
        MdGame.inst.startGame();
    }

    public onShare()
    {
        Plat.shareAppMessage();
    }
   
    

}